<?php

class ZFBlog_View_Helper_BaseUrl
{

    protected static $baseUrl = null;

    public function baseUrl()
    {
        if (!is_null(self::$baseUrl)) {
            return self::$baseUrl;
        }
        $front = Zend_Controller_Front::getInstance();
        $url = rtrim($front->getBaseUrl(), '/');
        self::$baseUrl = $url;
        return $url;
    }

}